#ifndef SCENEPARAMETERS_HEADER_VIZMF_PROJECT
#define SCENEPARAMETERS_HEADER_VIZMF_PROJECT

/*
  VizMF SceneParameters class

  Defines paramenters of a scene which are independent of its contents
*/

#include "src/core/scene/camera.h"
#include "src/core/scene/material.h"
#include "src/core/scene/light.h"
#include <vector>


class SceneParameters {
private:
  typedef std::vector<Light> VL;
public:
  enum Projection { Orthographic, Isometric, Unknown };
  typedef Material material_type;
  typedef VL::iterator lights_iterator;
  typedef VL::const_iterator lights_const_iterator;

public:
  SceneParameters() {}
  SceneParameters(const Camera& camera, const Projection& projection, const material_type material)
    : camera_(camera), projection_(projection), background_material_(material) {}

  void setCamera(const Camera& camera) { camera_ = camera; }
  const Camera& camera() const { return camera_; }

  void setBGMaterial(const material_type& material) { background_material_ = material; }
  const material_type& bgMaterial() const { return background_material_; }

  void setProjection(Projection value) { projection_ = value; }
  Projection projection() const {return projection_; }

  void loadDefault()
  {
    projection_ = Isometric;
    background_material_ = Material(0.0, 0.0, 0.0, 1.0);
  }

  void addLight(const Light& light) { lights_.push_back(light); }
  lights_iterator removeLight(lights_iterator light) { return lights_.erase(light); }
  lights_iterator lightsBegin() {return lights_.begin(); }
  lights_iterator lightsEnd() { return lights_.end(); }
  lights_const_iterator lightsBegin() const {return lights_.begin(); }
  lights_const_iterator lightsEnd() const { return lights_.end(); }

private:
  Camera camera_;
  VL lights_;
  Projection projection_;
  material_type background_material_;

};

#endif // SCENEPARAMETERS_HEADER_VIZMF_PROJECT
